<?php if(!defined("HDPHP_PATH"))exit;C("SHOW_NOTICE",FALSE);?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
    <title>分类管理</title>
    <script type='text/javascript' src='http://localhost/kuangjia/hdphp/hdphp/../hdjs/jquery-1.8.2.min.js'></script>
<link href='http://localhost/kuangjia/hdphp/hdphp/../hdjs/css/hdjs.css' rel='stylesheet' media='screen'>
<script src='http://localhost/kuangjia/hdphp/hdphp/../hdjs/js/hdjs.js'></script>
<script src='http://localhost/kuangjia/hdphp/hdphp/../hdjs/js/slide.js'></script>
<script src='http://localhost/kuangjia/hdphp/hdphp/../hdjs/org/cal/lhgcalendar.min.js'></script>
<script type='text/javascript'>
		HOST = 'http://localhost';
		ROOT = 'http://localhost/daicms';
		WEB = 'http://localhost/daicms/index.php';
		URL = 'http://localhost/daicms/index.php?a=Admin&c=Category&m=index';
		HDPHP = 'http://localhost/kuangjia/hdphp/hdphp';
		HDPHPDATA = 'http://localhost/kuangjia/hdphp/hdphp/Data';
		HDPHPTPL = 'http://localhost/kuangjia/hdphp/hdphp/Lib/Tpl';
		HDPHPEXTEND = 'http://localhost/kuangjia/hdphp/hdphp/Extend';
		APP = 'http://localhost/daicms/index.php?a=Admin';
		CONTROL = 'http://localhost/daicms/index.php?a=Admin&c=Category';
		METH = 'http://localhost/daicms/index.php?a=Admin&c=Category&m=index';
		GROUP = 'http://localhost/daicms/./Cms';
		TPL = 'http://localhost/daicms/./Cms/Cms/Admin/Tpl';
		CONTROLTPL = 'http://localhost/daicms/./Cms/Cms/Admin/Tpl/Category';
		STATIC = 'http://localhost/daicms/Static';
		PUBLIC = 'http://localhost/daicms/./Cms/Cms/Admin/Tpl/Public';
		HISTORY = 'http://localhost/daicms/index.php?a=Admin&c=Index&m=Index';
		HTTPREFERER = 'http://localhost/daicms/index.php?a=Admin&c=Index&m=Index';
</script>
    <link href="http://localhost/kuangjia/hdphp/hdphp/Extend/Org/bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen"><script src="http://localhost/kuangjia/hdphp/hdphp/Extend/Org/bootstrap/js/bootstrap.min.js"></script>
  <!--[if lte IE 6]>
  <link rel="stylesheet" type="text/css" href="http://localhost/kuangjia/hdphp/hdphp/Extend/Org/bootstrap/ie6/css/bootstrap-ie6.css">
  <![endif]-->
      <!--[if lt IE 9]>
    <script src="http://localhost/kuangjia/hdphp/hdphp/Extend/Org/bootstrap/js/html5shiv.min.js"></script>
    <script src="http://localhost/kuangjia/hdphp/hdphp/Extend/Org/bootstrap/js/respond.min.js"></script>
    <![endif]-->
    <style type="text/css">
        .plus_minus{
            width: 20px;
        }
    </style>
    <link rel="stylesheet" type="text/css" href="http://localhost/daicms/Static/Css/common.css">
    <link type="text/css" rel="stylesheet" href="http://localhost/daicms/./Cms/Cms/Admin/Tpl/Category/css/css.css"/>
    <script type="text/javascript" src="http://localhost/daicms/./Cms/Cms/Admin/Tpl/Category/js/js.js"></script>
    <script type="text/javascript" src="http://localhost/daicms/./Cms/Cms/Admin/Tpl/Category/js/kuai.js"></script>
    <script type="text/javascript">
        
    </script>
</head>
<body>
<div class="wrap">
    <table class="table2">
        <thead>
        <tr>
            <td width="30"></td>
            <td>分类id</td>
            <td>分类名称</td>
            <td>分类标题</td>
            <td>分类排序</td>
            <td>静态目录</td>
            <td>列表静态</td>
            <td>内容静态</td>
            <td>是否显示</td>
            <td width="200">操作</td>
        </tr>
        </thead>
        <tbody>
            <?php if(is_array($data)):?><?php  foreach($data as $v){ ?>
            
                <tr pid='<?php echo $v['pid'];?>' cid='<?php echo $v['cid'];?>'>
                     <td width="30">
                    <!-- <span class="btn btn-primary btn-xs plus_minus">+</span> -->
                    <span class="btn btn-success btn-xs plus_minus">+</span>
                    </td>
                    <td><?php echo $v['cid'];?></td>
                    <td><?php echo $v['cname'];?></td>
                    <td><?php echo $v['ctitle'];?></td>
                    <td><?php echo $v['csort'];?></td>
                    <td><?php echo $v['htmldir'];?></td>
                    <td>
                        <?php if($v['is_listhtml'] == 0){?>
                            <a href="javascript:" class="glyphicon glyphicon-remove" onclick="hd_ajax('<?php echo U('Category/ajax_update_stat',array('cid' =>$v['cid'] ,'type' => 'list','switch' =>1));?>')"></a>
                        <?php  }else{ ?>
                            <a href="javascript:" class="glyphicon glyphicon-ok" onclick="hd_ajax('<?php echo U('Category/ajax_update_stat',array('cid' =>$v['cid'] ,'type' => 'list','switch' =>0));?>')"></a>
                        <?php }?>
                    </td>
                    <td>
                        <?php if($v['is_archtml'] == 0){?>
                            <a href="javascript:" class="glyphicon glyphicon-remove" onclick="hd_ajax('<?php echo U('Category/ajax_update_stat',array('cid'=>$v['cid'],'type'=>'arc','switch'=>1));?>')"></a>
                        <?php  }else{ ?>
                            <a href="javascript:" class="glyphicon glyphicon-ok" onclick="hd_ajax('<?php echo U('Category/ajax_update_stat',array('cid'=>$v['cid'],'type'=>'arc','switch'=>0));?>')"></a>
                        <?php }?>
                    </td>
                   <td>
                        <?php if($v['is_show'] == 0){?>
                            <a href="javascript:" class="glyphicon glyphicon-remove" onclick="hd_ajax('<?php echo U('Category/ajax_update_stat',array('cid'=>$v['cid'],'type'=>'show','switch'=>1));?>')"></a>
                        <?php  }else{ ?>
                            <a href="javascript:" class="glyphicon glyphicon-ok" onclick="hd_ajax('<?php echo U('Category/ajax_update_stat',array('cid'=>$v['cid'],'type'=>'show','switch'=>0));?>')"></a>
                        <?php }?>
                    </td>
                    <td width="200">
                        <a href="<?php echo U('add_son',array('cid'=>$v['cid']));?>" class="btn btn-primary btn-sm">添加子分类</a>
                        
                        <a href="<?php echo U('edit',array('cid'=>$v['cid']));?>" class="btn btn-success btn-sm">
                            编辑</a>
                        <a href="javascript:" class="btn btn-danger btn-sm" onclick="if(confirm('确定要删除吗？')) hd_ajax('<?php echo U('del',array('cid'=>$v['cid']));?>')">删除</a>
                     
                    </td>
                </tr>
           <?php }?><?php endif;?>
        </tbody>
    </table>
    <div class="page_hdjob">
        <?php echo $page;?>
    </div>
</div>

</body>
</html>


